package com.coffee.core;

/**
 * @author: songkui
 * @since: 2017/3/17 16:49
 * opcode :   0 普通提示， 1，弹到大厅， 2， 弹到登录， 3，重新读取服务器连接
 */
public enum CoffeeResponseEnum implements ResponseCode {

    /**
     * 系统
     */
    Success(200, 0, "SUCCESS"),    // "成功"),
    SysException(500, 0, "系统异常"),  // 系统异常
    ParamInvalid(600, 0, "参数无效"),
    NotHandler(601, 0, "未找到相关处理器"),
    NotPermission(403, 0, "未找到相关资源"),
    NotData(605, 0, "未找到对应数据"),
    DataExist(606, 0, "数据已存在"),
    LoginFailed(401, 2, "登录信息失效"),
    ;


    private final int code;
    private final int opcode;
    private final String message;

    CoffeeResponseEnum(int code, int opcode, String msg) {
        this.code = code;
        this.opcode = opcode;
        this.message = msg;
    }

    public int code() {
        return this.code;
    }

    public int opcode() {
        return this.opcode;
    }

    @Override
    public String message() {
        return this.message;
    }



}
